-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(crons): Pass correct event types, fix checkin_margin field, add example #674
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #674 +/- ##
==========================================
+ Coverage 80.51% 80.56% +0.04%
==========================================
Files 43 44 +1
Lines 4450 4460 +10
==========================================
+ Hits 3583 3593 +10
- Misses 734 736 +2
+ Partials 133 131 -2
☔ View full report in Codecov by Sentry. |
@@ -80,7 +80,7 @@ type MonitorConfig struct { //nolint: maligned // prefer readability over optima | |||
Schedule MonitorSchedule `json:"schedule,omitempty"` | |||
// The allowed margin of minutes after the expected check-in time that | |||
// the monitor will not be considered missed for. | |||
CheckInMargin int64 `json:"check_in_margin,omitempty"` | |||
CheckInMargin int64 `json:"checkin_margin,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this almost looks like a typo to me. Will raise with the Crons team.
MonitorSlug: monitorSlug, | ||
Status: status, | ||
}, | ||
nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this causes issues. In Laravel, we sent the monitor config along for all check-ins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sorta feels natural to me: when the monitor already exists (guaranteed by the first check-in), we don't have to pass in the monitor config anymore.
Follow-up to #661 that fixes a few issues and also adds an E2E example.
check_in_margin
->checkin_margin
(https://develop.sentry.dev/sdk/check-ins/#monitor-upsert-support)checkinType